package modelimplementation


type MonthlySchedule struct{

}

func(m *MonthlySchedule) IsLastDayOfMonth(date DateTime) bool{
	m1 := date.Month
	m2 := date.AddDays(1).Month

	return (m1 != m2)
}


func(m *MonthlySchedule) IsPaydate(payDate DateTime) bool{
	return m.IsLastDayOfMonth(IsPayDate)
}

func(m *MonthlySchedule) GetPayPeriodStartDate(payPeriodEndDate DateTime) *DateTime{
	LastDayOfMonth := payPeriodEndDate.Day
	firstDayOfMonth := payPeriodEndDate.AddDays(-(lastDayOfMonth - 1)) 
	return firstDayofMonth
}

